<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GListModel: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="data-models.html" title="Data Models">
<link rel="prev" href="data-models.html" title="Data Models">
<link rel="next" href="GListStore.html" title="GListStore">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GListModel.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GListModel.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites">  <span class="dim">|</span> 
                  <a href="#GListModel.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_implementations">  <span class="dim">|</span> 
                  <a href="#GListModel.implementations" class="shortcut">Known Implementations</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GListModel.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="data-models.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="data-models.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GListStore.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GListModel"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GListModel.top_of_page"></a>GListModel</span></h2>
<p>GListModel — An interface describing a dynamic list of objects</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GListModel.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="../gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
</td>
<td class="function_name">
<a class="link" href="GListModel.html#g-list-model-get-item-type" title="g_list_model_get_item_type ()">g_list_model_get_item_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GListModel.html#g-list-model-get-n-items" title="g_list_model_get_n_items ()">g_list_model_get_n_items</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="GListModel.html#g-list-model-get-item" title="g_list_model_get_item ()">g_list_model_get_item</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gobject-The-Base-Object-Type.html#GObject-struct"><span class="returnvalue">GObject</span></a> *
</td>
<td class="function_name">
<a class="link" href="GListModel.html#g-list-model-get-object" title="g_list_model_get_object ()">g_list_model_get_object</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GListModel.html#g-list-model-items-changed" title="g_list_model_items_changed ()">g_list_model_items_changed</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GListModel.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GListModel.html#GListModel-items-changed" title="The “items-changed” signal">items-changed</a></td>
<td class="signal_flags"><a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GListModel.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GListModel.html#GListModel-struct" title="GListModel">GListModel</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GListModel.html#GListModelInterface" title="struct GListModelInterface">GListModelInterface</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GListModel.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/home/mclasen/gnome/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
    <span class="lineart">╰──</span> GListModel
</pre>
</div>
<div class="refsect1">
<a name="GListModel.prerequisites"></a><h2>Prerequisites</h2>
<p>
GListModel requires
 <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>.</p>
</div>
<div class="refsect1">
<a name="GListModel.implementations"></a><h2>Known Implementations</h2>
<p>
GListModel is implemented by
 <a class="link" href="GListStore.html" title="GListStore">GListStore</a>.</p>
</div>
<div class="refsect1">
<a name="GListModel.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gio/gio.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GListModel.description"></a><h2>Description</h2>
<p><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> is an interface that represents a mutable list of
<a href="../gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObjects</span></a>. Its main intention is as a model for various widgets in
user interfaces, such as list views, but it can also be used as a
convenient method of returning lists of data, with support for
updates.</p>
<p>Each object in the list may also report changes in itself via some
mechanism (normally the <a href="../gobject-The-Base-Object-Type.html#GObject-notify"><span class="type">“notify”</span></a> signal).  Taken together
with the <a class="link" href="GListModel.html#GListModel-items-changed" title="The “items-changed” signal"><span class="type">“items-changed”</span></a> signal, this provides for a list
that can change its membership, and in which the members can change
their individual properties.</p>
<p>A good example would be the list of visible wireless network access
points, where each access point can report dynamic properties such as
signal strength.</p>
<p>It is important to note that the <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> itself does not report
changes to the individual items.  It only reports changes to the list
membership.  If you want to observe changes to the objects themselves
then you need to connect signals to the objects that you are
interested in.</p>
<p>All items in a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> are of (or derived from) the same type.
<a class="link" href="GListModel.html#g-list-model-get-item-type" title="g_list_model_get_item_type ()"><code class="function">g_list_model_get_item_type()</code></a> returns that type.  The type may be an
interface, in which case all objects in the list must implement it.</p>
<p>The semantics are close to that of an array:
<a class="link" href="GListModel.html#g-list-model-get-n-items" title="g_list_model_get_n_items ()"><code class="function">g_list_model_get_n_items()</code></a> returns the number of items in the list and
<a class="link" href="GListModel.html#g-list-model-get-item" title="g_list_model_get_item ()"><code class="function">g_list_model_get_item()</code></a> returns an item at a (0-based) position. In
order to allow implementations to calculate the list length lazily,
you can also iterate over items: starting from 0, repeatedly call
<a class="link" href="GListModel.html#g-list-model-get-item" title="g_list_model_get_item ()"><code class="function">g_list_model_get_item()</code></a> until it returns <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>An implementation may create objects lazily, but must take care to
return the same object for a given position until all references to
it are gone.</p>
<p>On the other side, a consumer is expected only to hold references on
objects that are currently "user visible", in order to faciliate the
maximum level of laziness in the implementation of the list and to
reduce the required number of signal connections at a given time.</p>
<p>This interface is intended only to be used from a single thread.  The
thread in which it is appropriate to use it depends on the particular
implementation, but typically it will be from the thread that owns
the <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
in effect at the time that the model was created.</p>
</div>
<div class="refsect1">
<a name="GListModel.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-list-model-get-item-type"></a><h3>g_list_model_get_item_type ()</h3>
<pre class="programlisting"><a href="../gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
g_list_model_get_item_type (<em class="parameter"><code><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> *list</code></em>);</pre>
<p>Gets the type of the items in <em class="parameter"><code>list</code></em>
. All items returned from
<code class="function">g_list_model_get_type()</code> are of that type or a subtype, or are an
implementation of that interface.</p>
<p>The item type of a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> can not change during the life of the
model.</p>
<div class="refsect3">
<a name="g-list-model-get-item-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description"><p>a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-list-model-get-item-type.returns"></a><h4>Returns</h4>
<p> the <a href="../gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the items contained in <em class="parameter"><code>list</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-list-model-get-n-items"></a><h3>g_list_model_get_n_items ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_list_model_get_n_items (<em class="parameter"><code><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> *list</code></em>);</pre>
<p>Gets the number of items in <em class="parameter"><code>list</code></em>
.</p>
<p>Depending on the model implementation, calling this function may be
less efficient than iterating the list with increasing values for
<em class="parameter"><code>position</code></em>
 until <a class="link" href="GListModel.html#g-list-model-get-item" title="g_list_model_get_item ()"><code class="function">g_list_model_get_item()</code></a> returns <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
<a name="g-list-model-get-n-items.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description"><p>a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-list-model-get-n-items.returns"></a><h4>Returns</h4>
<p> the number of items in <em class="parameter"><code>list</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-list-model-get-item"></a><h3>g_list_model_get_item ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
g_list_model_get_item (<em class="parameter"><code><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> *list</code></em>,
                       <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>);</pre>
<p>Get the item at <em class="parameter"><code>position</code></em>
. If <em class="parameter"><code>position</code></em>
 is greater than the number of
items in <em class="parameter"><code>list</code></em>
, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
<p><a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is never returned for an index that is smaller than the length
of the list.  See <a class="link" href="GListModel.html#g-list-model-get-n-items" title="g_list_model_get_n_items ()"><code class="function">g_list_model_get_n_items()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="g-list-model-get-item.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description"><p>a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position of the item to fetch</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-list-model-get-item.returns"></a><h4>Returns</h4>
<p>the item at <em class="parameter"><code>position</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-list-model-get-object"></a><h3>g_list_model_get_object ()</h3>
<pre class="programlisting"><a href="../gobject-The-Base-Object-Type.html#GObject-struct"><span class="returnvalue">GObject</span></a> *
g_list_model_get_object (<em class="parameter"><code><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> *list</code></em>,
                         <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>);</pre>
<p>Get the item at <em class="parameter"><code>position</code></em>
. If <em class="parameter"><code>position</code></em>
 is greater than the number of
items in <em class="parameter"><code>list</code></em>
, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
<p><a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is never returned for an index that is smaller than the length
of the list.  See <a class="link" href="GListModel.html#g-list-model-get-n-items" title="g_list_model_get_n_items ()"><code class="function">g_list_model_get_n_items()</code></a>.</p>
<p><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> g_list_model_get_item]</span></p>
<div class="refsect3">
<a name="g-list-model-get-object.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description"><p>a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position of the item to fetch</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-list-model-get-object.returns"></a><h4>Returns</h4>
<p>the object at <em class="parameter"><code>position</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-list-model-items-changed"></a><h3>g_list_model_items_changed ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_list_model_items_changed (<em class="parameter"><code><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> *list</code></em>,
                            <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                            <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> removed</code></em>,
                            <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> added</code></em>);</pre>
<p>Emits the <a class="link" href="GListModel.html#GListModel-items-changed" title="The “items-changed” signal"><span class="type">“items-changed”</span></a> signal on <em class="parameter"><code>list</code></em>
.</p>
<p>This function should only be called by classes implementing
<a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a>. It has to be called after the internal representation
of <em class="parameter"><code>list</code></em>
 has been updated, because handlers connected to this signal
might query the new state of the list.</p>
<p>Implementations must only make changes to the model (as visible to
its consumer) in places that will not cause problems for that
consumer.  For models that are driven directly by a write API (such
as <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a>), changes can be reported in response to uses of that
API.  For models that represent remote data, changes should only be
made from a fresh mainloop dispatch.  It is particularly not
permitted to make changes in response to a call to the <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a>
consumer API.</p>
<p>Stated another way: in general, it is assumed that code making a
series of accesses to the model via the API, without returning to the
mainloop, and without calling other code, will continue to view the
same contents of the model.</p>
<div class="refsect3">
<a name="g-list-model-items-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description"><p>a <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position at which <em class="parameter"><code>list</code></em>
changed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>removed</p></td>
<td class="parameter_description"><p>the number of items removed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>added</p></td>
<td class="parameter_description"><p>the number of items added</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
</div>
<div class="refsect1">
<a name="GListModel.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GListModel-struct"></a><h3>GListModel</h3>
<pre class="programlisting">typedef struct _GListModel GListModel;</pre>
<p><a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> is an opaque data structure and can only be accessed
using the following functions.</p>
</div>
<hr>
<div class="refsect2">
<a name="GListModelInterface"></a><h3>struct GListModelInterface</h3>
<pre class="programlisting">struct GListModelInterface {
  GTypeInterface g_iface;

  GType     (* get_item_type)   (GListModel *list);

  guint     (* get_n_items)     (GListModel *list);

  gpointer  (* get_item)        (GListModel *list,
                                 guint       position);
};
</pre>
<p>The virtual function table for <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a>.</p>
<div class="refsect3">
<a name="GListModelInterface.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GListModelInterface.get-item-type"></a>get_item_type</code></em> ()</p></td>
<td class="struct_member_description"><p>the virtual function pointer for <a class="link" href="GListModel.html#g-list-model-get-item-type" title="g_list_model_get_item_type ()"><code class="function">g_list_model_get_item_type()</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GListModelInterface.get-n-items"></a>get_n_items</code></em> ()</p></td>
<td class="struct_member_description"><p>the virtual function pointer for <a class="link" href="GListModel.html#g-list-model-get-n-items" title="g_list_model_get_n_items ()"><code class="function">g_list_model_get_n_items()</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GListModelInterface.get-item"></a>get_item</code></em> ()</p></td>
<td class="struct_member_description"><p>the virtual function pointer for <a class="link" href="GListModel.html#g-list-model-get-item" title="g_list_model_get_item ()"><code class="function">g_list_model_get_item()</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
</div>
<div class="refsect1">
<a name="GListModel.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GListModel-items-changed"></a><h3>The <code class="literal">“items-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> *list,
               <a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a>       position,
               <a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a>       removed,
               <a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a>       added,
               <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)</pre>
<p>This signal is emitted whenever items were added or removed to
<em class="parameter"><code>list</code></em>
. At <em class="parameter"><code>position</code></em>
, <em class="parameter"><code>removed</code></em>
 items were removed and <em class="parameter"><code>added</code></em>
 items
were added in their place.</p>
<div class="refsect3">
<a name="GListModel-items-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description"><p>the <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> that changed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position at which <em class="parameter"><code>list</code></em>
changed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>removed</p></td>
<td class="parameter_description"><p>the number of items removed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>added</p></td>
<td class="parameter_description"><p>the number of items added</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
</div>
<div class="refsect1">
<a name="GListModel.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>